var ReStartLayer = cc.Layer.extend({
    init: function(){
        var bRet = false;
        if (this._super()) {
            bRet = true;
        }
        return bRet;
    }
});

ReStartLayer.create = function(){
    var sl = new ReStartLayer();
    if (sl && sl.init()) {
        return sl;
    }
    return null;
}

var ReStartScene = cc.Scene.extend({
    onEnter: function(){
        this._super();
        var layer = ReStartLayer.create();
        this.addChild(layer);
    },
    onEnterTransitionDidFinish: function(){
        var fun = cc.CallFunc.create(function(){
            cc.Director.getInstance().replaceScene(cc.TransitionFade.create(0.6, StartLayer.scene()));
        });
        this.runAction(cc.Sequence.create(cc.DelayTime.create(0.1), fun))
        
    }
});
